home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 5 Developer's Kit / vb5 dev kit.iso / dev / mailx6 / _setup.2 / Group3 / ocxma95.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-07-19  |  24.0 KB  |  738 lines

  1. VERSION 4.00
  2. Begin VB.Form OcxMainForm 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Mail eXtension Win95 DEMO OCX-32"
  5.    ClientHeight    =   5160
  6.    ClientLeft      =   1485
  7.    ClientTop       =   1575
  8.    ClientWidth     =   6615
  9.    Height          =   5535
  10.    Icon            =   "ocxma95.frx":0000
  11.    Left            =   1440
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   5160
  16.    ScaleWidth      =   6615
  17.    Top             =   1245
  18.    Width           =   6705
  19.    Begin Mailx16Lib.MForm MForm1 
  20.       Left            =   1920
  21.       Top             =   4680
  22.       _Version        =   65542
  23.       _ExtentX        =   3413
  24.       _ExtentY        =   500
  25.       _StockProps     =   0
  26.       MXFormName      =   "FormTag1"
  27.    End
  28.    Begin Mailx16Lib.MSess MSess1 
  29.       Left            =   0
  30.       Top             =   4320
  31.       _Version        =   65542
  32.       _ExtentX        =   900
  33.       _ExtentY        =   900
  34.       _StockProps     =   0
  35.       Mail_Type       =   2
  36.       DisplayErrors   =   0   'False
  37.    End
  38.    Begin Threed.SSPanel SSPanel1 
  39.       Height          =   855
  40.       Left            =   0
  41.       TabIndex        =   1
  42.       Top             =   0
  43.       Width           =   6615
  44.       _Version        =   65536
  45.       _ExtentX        =   11668
  46.       _ExtentY        =   1508
  47.       _StockProps     =   15
  48.       BackColor       =   12632256
  49.       Outline         =   -1  'True
  50.       Begin ComctlLib.Toolbar Toolbar1 
  51.          Height          =   630
  52.          Left            =   120
  53.          Negotiate       =   -1  'True
  54.          TabIndex        =   2
  55.          Top             =   120
  56.          Width           =   6375
  57.          _Version        =   65536
  58.          _ExtentX        =   11245
  59.          _ExtentY        =   1111
  60.          _StockProps     =   96
  61.          ImageList       =   "ImageList1"
  62.          ButtonWidth     =   1032
  63.          ButtonHeight    =   1005
  64.          NumButtons      =   8
  65.          i1              =   "ocxma95.frx":0442
  66.          i2              =   "ocxma95.frx":0609
  67.          i3              =   "ocxma95.frx":07A8
  68.          i4              =   "ocxma95.frx":0963
  69.          i5              =   "ocxma95.frx":0B06
  70.          i6              =   "ocxma95.frx":0CB1
  71.          i7              =   "ocxma95.frx":0E58
  72.          i8              =   "ocxma95.frx":0FF7
  73.          AlignSet        =   -1  'True
  74.       End
  75.    End
  76.    Begin Mailx16Lib.MMsg MMsg1 
  77.       Left            =   0
  78.       Top             =   3720
  79.       _Version        =   65542
  80.       _ExtentX        =   900
  81.       _ExtentY        =   900
  82.       _StockProps     =   0
  83.       MarkAsRead      =   0   'False
  84.       DisplayErrors   =   0   'False
  85.       BindString      =   "MSess1"
  86.       FastFetch       =   -1  'True
  87.    End
  88.    Begin Mailx16Lib.MReci MReci1 
  89.       Left            =   5400
  90.       Top             =   4440
  91.       _Version        =   65542
  92.       _ExtentX        =   900
  93.       _ExtentY        =   900
  94.       _StockProps     =   0
  95.       DisplayErrors   =   0   'False
  96.       BindString      =   "MMsg2"
  97.    End
  98.    Begin Mailx16Lib.MFile MFile1 
  99.       Left            =   6000
  100.       Top             =   4440
  101.       _Version        =   65542
  102.       _ExtentX        =   900
  103.       _ExtentY        =   900
  104.       _StockProps     =   0
  105.       BindString      =   "MMsg2"
  106.    End
  107.    Begin Mailx16Lib.MMsg MMsg2 
  108.       Left            =   4800
  109.       Top             =   4440
  110.       _Version        =   65542
  111.       _ExtentX        =   900
  112.       _ExtentY        =   900
  113.       _StockProps     =   0
  114.       SuppressAttach  =   0   'False
  115.       DisplayErrors   =   0   'False
  116.       BindString      =   "MSess1"
  117.       FastFetch       =   -1  'True
  118.    End
  119.    Begin TabDlg.SSTab SSTab1 
  120.       Height          =   3735
  121.       Left            =   120
  122.       TabIndex        =   3
  123.       Top             =   960
  124.       Width           =   6375
  125.       _Version        =   65536
  126.       _ExtentX        =   11245
  127.       _ExtentY        =   6588
  128.       _StockProps     =   15
  129.       Caption         =   "Container Messages"
  130.       TabsPerRow      =   4
  131.       Tab             =   0
  132.       TabOrientation  =   0
  133.       Tabs            =   4
  134.       Style           =   1
  135.       TabMaxWidth     =   0
  136.       TabHeight       =   529
  137.       TabCaption(0)   =   "Container Messages"
  138.       Tab(0).ControlCount=   4
  139.       Tab(0).ControlEnabled=   -1  'True
  140.       Tab(0).Control(0)=   "Label2"
  141.       Tab(0).Control(1)=   "nInbox"
  142.       Tab(0).Control(2)=   "TreeView1"
  143.       Tab(0).Control(3)=   "SSPanel2"
  144.       TabCaption(1)   =   "Recipients"
  145.       Tab(1).ControlCount=   7
  146.       Tab(1).ControlEnabled=   0   'False
  147.       Tab(1).Control(0)=   "szResolve"
  148.       Tab(1).Control(1)=   "ListView3"
  149.       Tab(1).Control(2)=   "SSCommand4"
  150.       Tab(1).Control(3)=   "SSCommand3"
  151.       Tab(1).Control(4)=   "SSCommand2"
  152.       Tab(1).Control(5)=   "Label5"
  153.       Tab(1).Control(6)=   "Label4"
  154.       TabCaption(2)   =   "File Attachments"
  155.       Tab(2).ControlCount=   3
  156.       Tab(2).ControlEnabled=   0   'False
  157.       Tab(2).Control(0)=   "szFiles"
  158.       Tab(2).Control(1)=   "Label6"
  159.       Tab(2).Control(2)=   "ListView2"
  160.       TabCaption(3)   =   "Message"
  161.       Tab(3).ControlCount=   10
  162.       Tab(3).ControlEnabled=   0   'False
  163.       Tab(3).Control(0)=   "szFrom"
  164.       Tab(3).Control(1)=   "szTime"
  165.       Tab(3).Control(2)=   "szSubject"
  166.       Tab(3).Control(3)=   "Frame1"
  167.       Tab(3).Control(4)=   "Label7"
  168.       Tab(3).Control(5)=   "Label3"
  169.       Tab(3).Control(6)=   "SSCommand6"
  170.       Tab(3).Control(7)=   "SSCommand5"
  171.       Tab(3).Control(8)=   "Label1"
  172.       Tab(3).Control(9)=   "SSCommand1"
  173.       Begin VB.TextBox szFrom 
  174.          Height          =   285
  175.          Left            =   -74040
  176.          TabIndex        =   27
  177.          Top             =   1200
  178.          Width           =   3975
  179.       End
  180.       Begin VB.TextBox szTime 
  181.          Height          =   285
  182.          Left            =   -74040
  183.          TabIndex        =   26
  184.          Top             =   840
  185.          Width           =   3975
  186.       End
  187.       Begin VB.TextBox szSubject 
  188.          Height          =   285
  189.          Left            =   -74040
  190.          TabIndex        =   14
  191.          Top             =   480
  192.          Width           =   3975
  193.       End
  194.       Begin VB.TextBox szResolve 
  195.          Height          =   285
  196.          Left            =   -73560
  197.          TabIndex        =   8
  198.          Top             =   480
  199.          Width           =   3375
  200.       End
  201.       Begin Threed.SSPanel SSPanel2 
  202.          Height          =   375
  203.          Left            =   2520
  204.          TabIndex        =   20
  205.          Top             =   3210
  206.          Width           =   3735
  207.          _Version        =   65536
  208.          _ExtentX        =   6588
  209.          _ExtentY        =   661
  210.          _StockProps     =   15
  211.          BackColor       =   12632256
  212.          BevelOuter      =   1
  213.          Begin ComctlLib.ProgressBar ProgressBar1 
  214.             Height          =   270
  215.             Left            =   45
  216.             TabIndex        =   21
  217.             Top             =   45
  218.             Width           =   3645
  219.             _Version        =   65536
  220.             _ExtentX        =   6429
  221.             _ExtentY        =   476
  222.             _StockProps     =   192
  223.             Appearance      =   1
  224.          End
  225.       End
  226.       Begin VB.Frame Frame1 
  227.          Caption         =   "Note Part:"
  228.          Height          =   1815
  229.          Left            =   -74880
  230.          TabIndex        =   22
  231.          Top             =   1680
  232.          Width           =   4815
  233.          Begin RichtextLib.RichTextBox szNoteText 
  234.             Height          =   1455
  235.             Left            =   120
  236.             TabIndex        =   23
  237.             Top             =   240
  238.             Width           =   4575
  239.             _Version        =   65536
  240.             _ExtentX        =   8070
  241.             _ExtentY        =   2566
  242.             _StockProps     =   69
  243.             BackColor       =   -2147483643
  244.             TextRTF         =   $"ocxma95.frx":11A2
  245.             RightMargin     =   4555.17
  246.          End
  247.       End
  248.       Begin ComctlLib.TreeView TreeView1 
  249.          Height          =   2655
  250.          Left            =   120
  251.          TabIndex        =   29
  252.          Top             =   480
  253.          Width           =   6135
  254.          _Version        =   65536
  255.          _ExtentX        =   10821
  256.          _ExtentY        =   4683
  257.          _StockProps     =   196
  258.          Appearance      =   1
  259.          BorderStyle     =   1
  260.          HideSelection   =   0   'False
  261.          ImageList       =   "ImageList2"
  262.          Indentation     =   529
  263.          LabelEdit       =   1
  264.          LineStyle       =   1
  265.          PathSeparator   =   "\"
  266.          Sorted          =   -1  'True
  267.          Style           =   7
  268.       End
  269.       Begin ComctlLib.ListView ListView3 
  270.          Height          =   2415
  271.          Left            =   -74880
  272.          TabIndex        =   28
  273.          Top             =   1200
  274.          Width           =   4695
  275.          _Version        =   65536
  276.          _ExtentX        =   8281
  277.          _ExtentY        =   4260
  278.          _StockProps     =   205
  279.          ForeColor       =   -2147483640
  280.          BackColor       =   -2147483643
  281.          Appearance      =   1
  282.          BorderStyle     =   1
  283.          HideSelection   =   0   'False
  284.          Icons           =   "ImageList1"
  285.          LabelEdit       =   1
  286.          SmallIcons      =   ""
  287.       End
  288.       Begin VB.Label Label7 
  289.          Alignment       =   1  'Right Justify
  290.          Caption         =   "From:"
  291.          Height          =   255
  292.          Left            =   -74880
  293.          TabIndex        =   25
  294.          Top             =   1200
  295.          Width           =   700
  296.       End
  297.       Begin VB.Label Label3 
  298.          Alignment       =   1  'Right Justify
  299.          Caption         =   "Time:"
  300.          Height          =   255
  301.          Left            =   -74880
  302.          TabIndex        =   24
  303.          Top             =   840
  304.          Width           =   700
  305.       End
  306.       Begin Threed.SSCommand SSCommand6 
  307.          Height          =   855
  308.          Left            =   -69840
  309.          TabIndex        =   19
  310.          Top             =   1560
  311.          Width           =   1095
  312.          _Version        =   65536
  313.          _ExtentX        =   1931
  314.          _ExtentY        =   1508
  315.          _StockProps     =   78
  316.          Caption         =   "Forward"
  317.          Picture         =   "ocxma95.frx":1285
  318.       End
  319.       Begin Threed.SSCommand SSCommand5 
  320.          Height          =   855
  321.          Left            =   -69840
  322.          TabIndex        =   18
  323.          Top             =   2640
  324.          Width           =   1095
  325.          _Version        =   65536
  326.          _ExtentX        =   1931
  327.          _ExtentY        =   1508
  328.          _StockProps     =   78
  329.          Caption         =   "New Msg"
  330.          Picture         =   "ocxma95.frx":16D7
  331.       End
  332.       Begin VB.Label szFiles 
  333.          Caption         =   "0"
  334.          Height          =   255
  335.          Left            =   -73320
  336.          TabIndex        =   17
  337.          Top             =   3360
  338.          Width           =   1815
  339.       End
  340.       Begin VB.Label Label1 
  341.          Alignment       =   1  'Right Justify
  342.          Caption         =   "Subject:"
  343.          Height          =   255
  344.          Left            =   -74880
  345.          TabIndex        =   16
  346.          Top             =   480
  347.          Width           =   700
  348.       End
  349.       Begin Threed.SSCommand SSCommand1 
  350.          Height          =   855
  351.          Left            =   -69840
  352.          TabIndex        =   15
  353.          Top             =   480
  354.          Width           =   1095
  355.          _Version        =   65536
  356.          _ExtentX        =   1931
  357.          _ExtentY        =   1508
  358.          _StockProps     =   78
  359.          Caption         =   "Reply"
  360.          Font3D          =   3
  361.          Picture         =   "ocxma95.frx":1B29
  362.       End
  363.       Begin VB.Label Label6 
  364.          Caption         =   "Total Files included:"
  365.          Height          =   255
  366.          Left            =   -74880
  367.          TabIndex        =   13
  368.          Top             =   3360
  369.          Width           =   1455
  370.       End
  371.       Begin ComctlLib.ListView ListView2 
  372.          Height          =   2775
  373.          Left            =   -74880
  374.          TabIndex        =   12
  375.          Top             =   480
  376.          Width           =   6135
  377.          _Version        =   65536
  378.          _ExtentX        =   10821
  379.          _ExtentY        =   4895
  380.          _StockProps     =   205
  381.          ForeColor       =   -2147483640
  382.          BackColor       =   -2147483643
  383.          Appearance      =   1
  384.          BorderStyle     =   1
  385.          Icons           =   ""
  386.          LabelEdit       =   1
  387.          SmallIcons      =   ""
  388.          View            =   3
  389.          NumItems        =   3
  390.          i1              =   "ocxma95.frx":1F7B
  391.          i2              =   "ocxma95.frx":202B
  392.          i3              =   "ocxma95.frx":20D9
  393.       End
  394.       Begin Threed.SSCommand SSCommand4 
  395.          Height          =   975
  396.          Left            =   -70080
  397.          TabIndex        =   11
  398.          Top             =   1500
  399.          Width           =   1335
  400.          _Version        =   65536
  401.          _ExtentX        =   2355
  402.          _ExtentY        =   1720
  403.          _StockProps     =   78
  404.          Caption         =   "Add Recipients"
  405.          Picture         =   "ocxma95.frx":2187
  406.       End
  407.       Begin Threed.SSCommand SSCommand3 
  408.          Height          =   975
  409.          Left            =   -70080
  410.          TabIndex        =   10
  411.          Top             =   420
  412.          Width           =   1335
  413.          _Version        =   65536
  414.          _ExtentX        =   2355
  415.          _ExtentY        =   1720
  416.          _StockProps     =   78
  417.          Caption         =   "Resolve Names"
  418.          Picture         =   "ocxma95.frx":25D9
  419.       End
  420.       Begin Threed.SSCommand SSCommand2 
  421.          Height          =   975
  422.          Left            =   -70080
  423.          TabIndex        =   9
  424.          Top             =   2580
  425.          Width           =   1335
  426.          _Version        =   65536
  427.          _ExtentX        =   2355
  428.          _ExtentY        =   1720
  429.          _StockProps     =   78
  430.          Caption         =   "Address Book"
  431.          Picture         =   "ocxma95.frx":2A2B
  432.       End
  433.       Begin VB.Label Label5 
  434.          Caption         =   "Resolve Names:"
  435.          Height          =   255
  436.          Left            =   -74880
  437.          TabIndex        =   7
  438.          Top             =   540
  439.          Width           =   1215
  440.       End
  441.       Begin VB.Label Label4 
  442.          Caption         =   "Current Recipient List:"
  443.          Height          =   255
  444.          Left            =   -74880
  445.          TabIndex        =   6
  446.          Top             =   900
  447.          Width           =   1695
  448.       End
  449.       Begin VB.Label nInbox 
  450.          Caption         =   "0"
  451.          Height          =   255
  452.          Left            =   2040
  453.          TabIndex        =   5
  454.          Top             =   3360
  455.          Width           =   855
  456.       End
  457.       Begin VB.Label Label2 
  458.          Caption         =   "Total Inbox Messages:"
  459.          Height          =   255
  460.          Left            =   240
  461.          TabIndex        =   4
  462.          Top             =   3360
  463.          Width           =   1695
  464.       End
  465.    End
  466.    Begin ComctlLib.ImageList ImageList2 
  467.       Left            =   0
  468.       Top             =   840
  469.       _Version        =   65536
  470.       _ExtentX        =   1005
  471.       _ExtentY        =   1005
  472.       _StockProps     =   1
  473.       BackColor       =   -2147483643
  474.       ImageWidth      =   32
  475.       ImageHeight     =   32
  476.       NumImages       =   4
  477.       i1              =   "ocxma95.frx":2E7D
  478.       i2              =   "ocxma95.frx":3374
  479.       i3              =   "ocxma95.frx":386B
  480.       i4              =   "ocxma95.frx":3D62
  481.    End
  482.    Begin ComctlLib.ImageList ImageList1 
  483.       Left            =   6000
  484.       Top             =   840
  485.       _Version        =   65536
  486.       _ExtentX        =   1005
  487.       _ExtentY        =   1005
  488.       _StockProps     =   1
  489.       BackColor       =   -2147483643
  490.       ImageWidth      =   32
  491.       ImageHeight     =   32
  492.       NumImages       =   8
  493.       i1              =   "ocxma95.frx":4259
  494.       i2              =   "ocxma95.frx":4750
  495.       i3              =   "ocxma95.frx":4C47
  496.       i4              =   "ocxma95.frx":513E
  497.       i5              =   "ocxma95.frx":5635
  498.       i6              =   "ocxma95.frx":5B2C
  499.       i7              =   "ocxma95.frx":6023
  500.       i8              =   "ocxma95.frx":651A
  501.    End
  502.    Begin ComctlLib.StatusBar StatusBar1 
  503.       Align           =   2  'Align Bottom
  504.       Height          =   300
  505.       Left            =   0
  506.       TabIndex        =   0
  507.       Top             =   4860
  508.       Width           =   6615
  509.       _Version        =   65536
  510.       _ExtentX        =   11668
  511.       _ExtentY        =   529
  512.       _StockProps     =   68
  513.       AlignSet        =   -1  'True
  514.       Style           =   1
  515.       SimpleText      =   "Mail eXtension Session CLOSED"
  516.       i1              =   "ocxma95.frx":6A11
  517.    End
  518. Attribute VB_Name = "OcxMainForm"
  519. Attribute VB_Creatable = False
  520. Attribute VB_Exposed = False
  521. Private Sub TabStrip1_Click()
  522. End Sub
  523. Private Sub RichTextBox1_Click()
  524. End Sub
  525. Private Sub ListView3_DblClick()
  526.     Dim ItemX As ListItem
  527.     On Error GoTo NoItem
  528.     Set ItemX = ListView3.SelectedItem
  529.     OcxMainForm.MousePointer = 11
  530.     ReciID = ItemX.Key
  531.     ReciNum = Mid$(ReciID, 2)
  532.     nReci = Val(ReciNum)
  533.     MReci1.RecipientNum = nReci
  534.     OcxMainForm.MousePointer = 1
  535.     ' Display Details
  536.     MReci1.Action = ACTION_DETAILS
  537. NoItem:
  538.     OcxMainForm.MousePointer = 1
  539. End Sub
  540. Private Sub SSCommand1_Click()
  541.     If IsActiveSession = True Then
  542.         MMsg2.Action = ACTION_REPLY
  543.         MMsg2.Action = ACTION_SENDMSG
  544.         If MMsg2.ErrorNum <> 0 Then
  545.             MsgBox "Unable to Send Message", 64, "Mail eXtension v1.60"
  546.         End If
  547.     End If
  548. End Sub
  549. Private Sub SSCommand2_Click()
  550.     If IsActiveSession = True Then
  551.         MReci1.Action = ACTION_ADDRESS
  552.         Refresh_Recipient
  553.     End If
  554. End Sub
  555. Private Sub SSCommand3_Click()
  556.     If IsActiveSession = True Then
  557.         MReci1.ResolveName = szResolve
  558.         szResolve = MReci1.ResolveName
  559.     End If
  560. End Sub
  561. Private Sub SSCommand4_Click()
  562.     If IsActiveSession = True Then
  563.         MReci1.Action = ACTION_ADDRECIPIENT
  564.         Refresh_Recipient
  565.     End If
  566. End Sub
  567. Private Sub SSCommand5_Click()
  568.     If IsActiveSession = True Then
  569.         MMsg2.Action = ACTION_NEW
  570.         MMsg2.Action = ACTION_SENDMSG
  571.         If MMsg2.ErrorNum <> 0 Then
  572.             MsgBox "Unable to Send Message", 64, "Mail eXtension v1.60"
  573.         End If
  574.     End If
  575. End Sub
  576. Private Sub SSCommand6_Click()
  577.     If IsActiveSession = True Then
  578.         MMsg2.Action = ACTION_FORWARD
  579.         MMsg2.Action = ACTION_SENDMSG
  580.         If MMsg2.ErrorNum <> 0 Then
  581.             MsgBox "Unable to Send Message", 64, "Mail eXtension v1.60"
  582.         End If
  583.     End If
  584. End Sub
  585. Private Sub Toolbar1_ButtonClick(ByVal Button As Button)
  586.     Dim OpenForms
  587.     Select Case Button.Tag
  588.         Case 1
  589.             LoginMailSystem
  590.             If MSess1.Logon = False Then
  591.                 TreeView1.Nodes.Clear
  592.                 ListView2.ListItems.Clear
  593.             End If
  594.         Case 2
  595.             OcxMainForm.MousePointer = 11
  596.             SSTab1.Tab = 0
  597.             OpenForms = DoEvents()
  598.             If IsActiveSession = True Then Refresh_Inbox
  599.             OcxMainForm.MousePointer = 1
  600.         Case 3
  601.             OcxMainForm.MousePointer = 11
  602.             SSTab1.Tab = 3
  603.             OpenForms = DoEvents()
  604.             OcxMainForm.MousePointer = 1
  605.         Case 4
  606.             OcxMainForm.MousePointer = 11
  607.             SSTab1.Tab = 1
  608.             OpenForms = DoEvents()
  609.             OcxMainForm.MousePointer = 1
  610.         Case 5
  611.             OcxMainForm.MousePointer = 11
  612.             SSTab1.Tab = 2
  613.             OpenForms = DoEvents()
  614.             OcxMainForm.MousePointer = 1
  615.         Case 6
  616.             If IsActiveSession = True Then
  617.                 OcxPassword.Show 1
  618.             End If
  619.     End Select
  620. End Sub
  621. Public Sub UpdateStatusBar()
  622.     If MSess1.Logon = True Then
  623.         StatusBar1.SimpleText = "Mail eXtension: Active Session. Current PostOffice=" + MSess1.POPath
  624.     Else
  625.         StatusBar1.SimpleText = "Mail eXtension Session Closed"
  626.     End If
  627. End Sub
  628. Public Function IsActiveSession() As Boolean
  629.     If MSess1.Logon = True Then
  630.         IsActiveSession = True
  631.     Else
  632.         IsActiveSession = False
  633.         MsgBox "No active Session available", 64, "Mail eXtension Win 95 DEMO 32"
  634.     End If
  635. End Function
  636. Public Sub Refresh_Inbox()
  637.     OcxMainForm.MousePointer = 11
  638.     nMsgCount = MMsg1.MsgCount
  639.     nInbox = nMsgCount
  640.     TreeView1.Nodes.Clear
  641.     If nMsgCount <> 0 Then
  642.         ProgressBar1.Value = 0
  643.         ProgressBar1.Max = nMsgCount
  644.         ' Clear The List View Content
  645.         Dim TreeNode As Node
  646.         Set TreeNode = TreeView1.Nodes.Add(, , "Inbox", "Inbox", 1)
  647.          ' Add the Message List
  648.         MMsg1.Action = ACTION_FINDFIRST
  649.         Do
  650.             If MMsg1.FetchMsg <> 0 Then
  651.                 ProgressBar1.Value = ProgressBar1.Value + 1
  652.                 If MMsg1.UnreadMsg = True Then
  653.                     Set TreeNode = TreeView1.Nodes.Add("Inbox", 4, MMsg1.MsgID, MMsg1.Subject, 3)
  654.                 Else
  655.                     Set TreeNode = TreeView1.Nodes.Add("Inbox", 4, MMsg1.MsgID, MMsg1.Subject, 4)
  656.                 End If
  657.                 MMsg1.Action = ACTION_FINDNEXT
  658.             End If
  659.         Loop While MMsg1.FetchMsg <> 0
  660.         ProgressBar1.Value = 0
  661.     End If
  662.     OcxMainForm.MousePointer = 1
  663. End Sub
  664. Public Sub Refresh_FileList()
  665.     nFileCount = MFile1.FileCount
  666.     szFiles = nFileCount
  667.     ListView2.ListItems.Clear
  668.     If nFileCount <> 0 Then
  669.         ' Add the File List
  670.         For nCurFile = 1 To nFileCount
  671.             MFile1.FileNum = nCurFile
  672.             Dim Item As ListItem
  673.             Set Item = ListView2.ListItems.Add(, , MFile1.filename, 0)
  674.             Item.SubItems(1) = MFile1.FilePath
  675.             Item.SubItems(2) = Str$(nCurFile)
  676.         Next nCurFile
  677.     End If
  678. End Sub
  679. Public Sub LoginMailSystem()
  680.     MSess1.Logon = True
  681.     UpdateStatusBar
  682.     If IsActiveSession = True Then
  683.         SSTab1.Tab = 0
  684.         OpenForms = DoEvents()
  685.         Refresh_Inbox
  686.     End If
  687. End Sub
  688. Public Sub Refresh_Recipient()
  689.     nReciCount = MReci1.RecipientCount
  690.     ListView3.ListItems.Clear
  691.     If nReciCount <> 0 Then
  692.         ' Add the Message List
  693.         For nCurReci = 1 To nReciCount
  694.             MReci1.RecipientNum = nCurReci
  695.             Dim Item As ListItem
  696.             Set Item = ListView3.ListItems.Add(, "R" + Str$(nCurReci), MReci1.RecipientName, 8)
  697.         Next
  698.     End If
  699. End Sub
  700. Private Sub TreeView1_Collapse(ByVal Node As Node)
  701.     If Node.Image = 2 Then
  702.         Node.Image = 1
  703.     End If
  704. End Sub
  705. Private Sub TreeView1_DblClick()
  706.     Dim ItemX As Node
  707.     Dim RootX As Node
  708.     Dim ParentX As Node
  709.     On Error GoTo NoItem
  710.     Set ItemX = TreeView1.SelectedItem
  711.     Set ParentX = ItemX.Parent
  712.     Set RootX = ParentX.Parent
  713.     OcxMainForm.MousePointer = 11
  714.     MMsg2.MsgID = ItemX.Key
  715.     ' Mark Message Image as UNREAD
  716.     If ItemX.Image <> 4 Then ItemX.Image = 4
  717.     If MMsg2.ErrorNum = 0 Then
  718.         szSubject = MMsg2.Subject
  719.         szNoteText = MMsg2.NoteText
  720.         szTime = MMsg2.TimeReceived
  721.         MReci1.FetchType = 0
  722.         MReci1 = MMsg2
  723.         szFrom = MReci1.RecipientName
  724.         MFile1 = MMsg2
  725.         Refresh_FileList
  726.         Refresh_Recipient
  727.         ' Set Current TAB'
  728.         SSTab1.Tab = 3 '
  729.     End If
  730. NoItem:
  731.     OcxMainForm.MousePointer = 1
  732. End Sub
  733. Private Sub TreeView1_Expand(ByVal Node As Node)
  734.     If Node.Image = 1 Then
  735.         Node.Image = 2
  736.     End If
  737. End Sub
  738.